package org.surthi.app.bank.db.dvo;

import java.io.Serializable;
import java.util.Set;

public class Account implements Serializable {

	private String accountId;
	private Bank bank;
	private AccountHolder accountHolder;
	private Set fixedDeposits;
	
	public Account(){}
	public String getAccountId() {
		return accountId;
	}
	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}
	public Bank getBank() {
		return bank;
	}
	public void setBank(Bank bank) {
		this.bank = bank;
	}
	public AccountHolder getAccountHolder() {
		return accountHolder;
	}
	public void setAccountHolder(AccountHolder accountHolder) {
		this.accountHolder = accountHolder;
	}
	public Set getFixedDeposits() {
		return fixedDeposits;
	}
	public void setFixedDeposits(Set fixedDeposits) {
		this.fixedDeposits = fixedDeposits;
	}
	
	@Override
		public boolean equals(Object object) {
			// TODO Auto-generated method stub
		Account account = null;
			if (object instanceof Account){
				account = (Account) object;
			}else{
				return false;
			}
			return this.accountId.equals(account.getAccountId());
		}	
}
